<?php
Class Category extends CI_Model
{
	function get_category()
	{
		$this -> db -> select('category_id, category_name');
		$this -> db -> from('category');

		$query = $this -> db -> get();

		if($query -> num_rows() > 0)
		{
			foreach ($query->result() as $row)
			{
				$arr_cate[$row->category_id] = $row->category_name;	
			}
			
			return $arr_cate;
		}
		else
		{
			return false;
		}
	}
}
?>